package mazeMultiThread;
/**
 * Global event handler and synchronizer via using global variables that the separate threads access independtly
 * @author Dani
 *
 */
public class GH { //Global handler and synchronizer
	//Controles de ventana
	public static final int VENTANA_WIDTH = 600;
	public static final int VENTANA_HEIGHT = 400;
	
	//Ajustes de laberinto
	public static int MAZE_WIDTH = 100;
	public static final int START_X = (MAZE_WIDTH /2) *2;
	public static int MAZE_HEIGHT = 60;
	public static final int START_Y = (MAZE_HEIGHT / 2)*2;
	public static int MAZE_SLOWNESS = 4;
	public static double PRIM_PROB = 1;
	public static final boolean USE_CUSTOM_PROB = true;
	public static final boolean USE_CUSTOM_CADENCE = false;
	public static final double[] CADENCE = {0,0,0,0};
	public static final double TOTAL_CADENCE = CADENCE[0] + CADENCE[1] + CADENCE[2] + CADENCE[3];
	
	//Ajustes visuales
	public static boolean PRINT_STATUS = true;
	public static final boolean PRINT_STACK = true;
	public static final boolean PRINT_NEW = true;
	public static final boolean PRINT_LEADER = true;
	public static boolean isPainted = false;
	
	//Controles de funcionamiento
	public static int STEP = 0;
	public static boolean PAUSE = false;
	public static boolean RESTART = false;
	
	
	//Cosas que tienen que ver con el zoom
	public static double scX = 1;
	public static double scY = 1;
	public static double xStart = 0;
	public static double yStart = 0;
	public static double defaultScaleFactor = 1.1;
	public static void scale (double factor) {
		GH.scX *= factor;
		GH.scY *= factor;
		GH.yStart *= factor;
		GH.xStart *= factor;
	}
	public static void scaleUp () {
		GH.scale(GH.defaultScaleFactor);
	}
	public static void scaleDown() {
		GH.scale(1/GH.defaultScaleFactor);
	}
}
